const { Monitor } = require('../../schemas')

// 埋点 添加
const commonMonitor = async (request, reqly) => {
  const params = JSON.parse(request.body)
  const data = new Monitor(params)
  const savaData = await data.save()
  return reqly.code(200).send({
    message: '上报成功',
    code: reqly.statusCode,
    data: null,
  })
}

module.exports = {
  commonMonitor,
}
